<script setup lang="ts">
import { leftAsideStore } from '@/export';
import demo from '/svgs/baomo.svg?raw';
import demo2 from '/svgs/boli.svg?raw';
import demo3 from '/svgs/PC板.svg?raw';
import demo4 from '/svgs/硝化池.svg?raw';
import demo5 from '/svgs/沉淀池.svg?raw';
import demo6 from '/svgs/baoqipan.svg?raw';
import demo7 from '/svgs/蓄水池.svg?raw';
import demo8 from '/svgs/guandao.svg?raw';
import demo9 from '/svgs/鱼缸2.svg?raw';
import demo10 from '/svgs/微滤机(1).svg?raw';
import demo11 from '/svgs/水泵.svg?raw';
import demo12 from '/svgs/制氧机.svg?raw';
import demo13 from '/svgs/湿帘风机.svg?raw';
import demo14 from '/svgs/保温灯.svg?raw';
import demo15 from '/svgs/rebeng.svg?raw';
import demo16 from '/svgs/鲈鱼11.svg?raw';
import demo17 from '/svgs/鲟鱼1.svg?raw';
import demo18 from '/svgs/生菜1.svg?raw';
import demo19 from '/svgs/芹菜1.svg?raw';
import demo20 from '/svgs/锦鲤.svg?raw';
import demo21 from '/svgs/罗非.svg?raw';
import demo22 from '/svgs/虹鳟1.svg?raw';
import demo23 from '/svgs/拉什桂.svg?raw';
import demo24 from '/svgs/涿州基地1.svg?raw';
import demo25 from '/svgs/阀门2.svg?raw';
import demo26 from '/svgs/管道2.svg?raw';
import demo27 from '/svgs/管道5.svg?raw';
import demo28 from '/svgs/单管点标注.svg?raw';
import demo29 from '/svgs/湿帘1.svg?raw';
import demo30 from '/svgs/风扇.svg?raw';
import demo31 from '/svgs/硫化池.svg?raw';
import demo32 from '/svgs/溶氧锥.svg?raw';
import demo33 from '/svgs/紫外线灯1.svg?raw';
const electrical_modules_files = import.meta.glob('./assets/svgs/electrical/**.svg', {
  eager: true,
  as: 'raw'
});
const electrical_stroke_modules_files = import.meta.glob('./assets/svgs/electrical/stroke/**.svg', {
  eager: true,
  as: 'raw'
});
const electrical_register_config: any = [];
for (const key in electrical_modules_files) {
  //根据路径获取svg文件名
  const name = key.split('/').pop()!.split('.')[0];
  electrical_register_config.push({
    id: name,
    title: name,
    type: 'svg',
    thumbnail: 'data:image/svg+xml;utf8,' + encodeURIComponent(electrical_modules_files[key]),
    svg: electrical_modules_files[key],
    props: {
      fill: {
        type: 'color',
        val: '#FF0000',
        title: '填充色'
      }
    }
  });
}
for (const key in electrical_stroke_modules_files) {
  //根据路径获取svg文件名
  const name = key.split('/').pop()!.split('.')[0];
  electrical_register_config.push({
    id: name,
    title: name,
    type: 'svg',
    thumbnail:
      'data:image/svg+xml;utf8,' + encodeURIComponent(electrical_stroke_modules_files[key]),
    svg: electrical_stroke_modules_files[key],
    props: {
      stroke: {
        type: 'color',
        val: '#00ff00',
        title: '边框色'
      }
    }
  });
}
leftAsideStore.registerConfig('连接组件', [
  {
    id: 'guandao',
    title: '管道',
    type: 'svg',
    thumbnail: '/svgs/管道2.svg',
    svg: demo26,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '直径'
      },
      text2: {
        type: 'input',
        val: '',
        title: '长度'
      }
    }
  },
  {
    id: 'guandao-xushui',
    title: '管道-蓄水',
    type: 'svg',
    thumbnail: '/svgs/管道5.svg',
    svg: demo27,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '直径'
      },
      text2: {
        type: 'input',
        val: '',
        title: '长度'
      }
    }
  },
  {
    id: 'zhijiaoguandao',
    title: '直角管道',
    type: 'svg',
    thumbnail: '/svgs/单管点标注.svg',
    svg: demo28,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '直径'
      },
      text2: {
        type: 'input',
        val: '',
        title: '长度'
      }
    }
  }
]);
leftAsideStore.registerConfig('对接场景', [
  {
    id: 'zhuozhoujidi',
    title: '涿州基地',
    type: 'svg',
    thumbnail: '/svgs/涿州基地1.svg',
    svg: demo24,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '经度'
      },
      text2: {
        type: 'input',
        val: '',
        title: '纬度'
      }
    }
  }
]);
leftAsideStore.registerConfig('材料选择', [
  {
    id: 'suliaobomo',
    title: '塑料薄膜',
    type: 'svg',
    thumbnail: '/svgs/baomo.svg',
    svg: demo,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '厚度'
      },
      text2: {
        type: 'input',
        val: '',
        title: '面积'
      },
      text3: {
        type: 'input',
        val: '',
        title: '质量'
      },
      text4: {
        type: 'input',
        val: '',
        title: '透光率'
      }
    }
  },
  {
    id: 'boli',
    title: '玻璃',
    type: 'svg',
    thumbnail: '/svgs/boli.svg',
    svg: demo2,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '厚度'
      },
      text2: {
        type: 'input',
        val: '',
        title: '面积'
      },
      text3: {
        type: 'input',
        val: '',
        title: '质量'
      },
      text4: {
        type: 'input',
        val: '',
        title: '透光率'
      }
    }
  },
  {
    id: 'pcban',
    title: 'PC板',
    type: 'svg',
    thumbnail: '/svgs/PC板.svg',
    svg: demo3,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '厚度'
      },
      text2: {
        type: 'input',
        val: '',
        title: '面积'
      },
      text3: {
        type: 'input',
        val: '',
        title: '质量'
      },
      text4: {
        type: 'input',
        val: '',
        title: '透光率'
      }
    }
  }
]);
leftAsideStore.registerConfig('耗电设备选择', [
  {
    id: 'weilvji',
    title: '微滤机',
    type: 'svg',
    thumbnail: '/svgs/微滤机(1).svg',
    svg: demo10,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '功率'
      },
      text2: {
        type: 'input',
        val: '',
        title: '水流速'
      },
      text3: {
        type: 'input',
        val: '',
        title: '启停频率'
      },
      text4: {
        type: 'input',
        val: '',
        title: '水位'
      },
      text6: {
        type: 'input',
        val: '',
        title: '滤网孔径大小'
      },
      text7: {
        type: 'input',
        val: '',
        title: '滤网目数'
      }
    }
  },
  {
    id: 'shuibeng',
    title: '水泵',
    type: 'svg',
    thumbnail: '/svgs/水泵.svg',
    svg: demo11,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '功率'
      },
      text2: {
        type: 'input',
        val: '',
        title: '水流量'
      },
      text3: {
        type: 'input',
        val: '',
        title: '启停频率'
      }
    }
  },
  {
    id: 'zhiyangji',
    title: '制氧机',
    type: 'svg',
    thumbnail: '/svgs/制氧机.svg',
    svg: demo12,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '功率'
      },
      text2: {
        type: 'input',
        val: '',
        title: '每日开启次数'
      },
      text3: {
        type: 'input',
        val: '',
        title: '每次开启时间（h）'
      }
    }
  },
  {
    id: 'shilian-fengji',
    title: '湿帘-风机',
    type: 'svg',
    thumbnail: '/svgs/湿帘风机.svg',
    svg: demo13,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '风机功率'
      },
      text2: {
        type: 'input',
        val: '',
        title: '风机风量'
      },
      text3: {
        type: 'input',
        val: '',
        title: '风机直径'
      },
      text4: {
        type: 'input',
        val: '',
        title: '湿帘面积'
      }
    }
  },
  {
    id: 'fengshan',
    title: '内循环风扇',
    type: 'svg',
    thumbnail: '/svgs/风扇.svg',
    svg: demo30,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '功率'
      },
      text2: {
        type: 'input',
        val: '',
        title: '启停频率'
      },
      text3: {
        type: 'input',
        val: '',
        title: '档位'
      }
    }
  },
  {
    id: 'baowendeng',
    title: '保温灯',
    type: 'svg',
    thumbnail: '/svgs/保温灯.svg',
    svg: demo14,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '功率'
      },
      text2: {
        type: 'input',
        val: '',
        title: '启停频率'
      },
      text3: {
        type: 'input',
        val: '',
        title: '温度'
      }
    }
  },
  {
    id: '紫外线灯',
    title: '紫外线灯',
    type: 'svg',
    thumbnail: '/svgs/紫外线灯1.svg',
    svg: demo33,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '功率'
      },
      text2: {
        type: 'input',
        val: '',
        title: '启停频率'
      },
      text3: {
        type: 'input',
        val: '',
        title: '每次启动时长'
      }
    }
  },
  {
    id: 'rebeng',
    title: '热泵',
    type: 'svg',
    thumbnail: '/svgs/rebeng.svg',
    svg: demo15,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '功率'
      },
      text2: {
        type: 'input',
        val: '',
        title: 'COP'
      },
      text3: {
        type: 'input',
        val: '',
        title: '循环水量'
      }
    }
  }
]);
leftAsideStore.registerConfig('鱼池配置选择', [
  {
    id: 'liuhuachi',
    title: '流化床',
    type: 'svg',
    thumbnail: '/svgs/硫化池.svg',
    svg: demo31,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '底面积'
      },
      text2: {
        type: 'input',
        val: '',
        title: '高'
      },
      text3: {
        type: 'input',
        val: '',
        title: '水温'
      },
      text4: {
        type: 'input',
        val: '',
        title: '溶解氧'
      },
      text5: {
        type: 'input',
        val: '',
        title: 'pH'
      }
    }
  },
  {
    id: 'chendianchi',
    title: '沉淀池',
    type: 'svg',
    thumbnail: '/svgs/沉淀池.svg',
    svg: demo5,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '底面积'
      },
      text2: {
        type: 'input',
        val: '',
        title: '高'
      },
      text3: {
        type: 'input',
        val: '',
        title: '水流量'
      }
    }
  },
  {
    id: 'shilian',
    title: '湿帘',
    type: 'svg',
    thumbnail: '/svgs/湿帘1.svg',
    svg: demo29,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '底面积'
      },
      text2: {
        type: 'input',
        val: '',
        title: '高'
      },
      text3: {
        type: 'input',
        val: '',
        title: '水流量'
      }
    }
  },
  {
    id: 'baoqipan',
    title: '曝气盘',
    type: 'svg',
    thumbnail: '/svgs/baoqipan.svg',
    svg: demo6,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '表面积'
      },
      text2: {
        type: 'input',
        val: '',
        title: '孔径'
      }
    }
  },
  {
    id: 'xushuichi',
    title: '蓄水池',
    type: 'svg',
    thumbnail: '/svgs/蓄水池.svg',
    svg: demo7,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '底面积'
      },
      text2: {
        type: 'input',
        val: '',
        title: '高'
      },
      text3: {
        type: 'input',
        val: '',
        title: '循环水流量'
      },
      text4: {
        type: 'input',
        val: '',
        title: '液位'
      }
    }
  },
  {
    id: 'xiaohuachi',
    title: '硝化池',
    type: 'svg',
    thumbnail: '/svgs/硝化池.svg',
    svg: demo4,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '底面积'
      },
      text2: {
        type: 'input',
        val: '',
        title: '高'
      },
      text3: {
        type: 'input',
        val: '',
        title: '液位'
      }
    }
  },
  {
    id: 'guandao',
    title: '管道',
    type: 'svg',
    thumbnail: '/svgs/guandao.svg',
    svg: demo8,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '直径'
      },
      text2: {
        type: 'input',
        val: '',
        title: '材质'
      }
    }
  },
  {
    id: 'rongyangzhui',
    title: '溶氧锥',
    type: 'svg',
    thumbnail: '/svgs/溶氧锥.svg',
    svg: demo32,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '直径'
      },
      text2: {
        type: 'input',
        val: '',
        title: '材质'
      }
    }
  },
  {
    id: 'yuchi',
    title: '鱼池',
    type: 'svg',
    thumbnail: '/svgs/鱼缸2.svg',
    svg: demo9,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '材质'
      },
      text2: {
        type: 'input',
        val: '',
        title: '底面积'
      },
      text3: {
        type: 'input',
        val: '',
        title: '高'
      },
      text4: {
        type: 'input',
        val: '',
        title: '液位'
      }
    }
  },
  {
    id: 'famen',
    title: '阀门',
    type: 'svg',
    thumbnail: '/svgs/阀门2.svg',
    svg: demo25,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '底面积'
      },
      text2: {
        type: 'input',
        val: '',
        title: '高'
      },
      text3: {
        type: 'input',
        val: '',
        title: '水流量'
      }
    }
  }
]);

leftAsideStore.registerConfig('品种选择', [
  {
    id: 'luyu',
    title: '鲈鱼',
    type: 'svg',
    thumbnail: '/svgs/鲈鱼11.svg',
    svg: demo16,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '生育期'
      },
      text2: {
        type: 'input',
        val: '',
        title: '生物量'
      },
      text3: {
        type: 'input',
        val: '',
        title: '生长状态'
      }
    }
  },
  {
    id: 'xunyu',
    title: '鲟鱼',
    type: 'svg',
    thumbnail: '/svgs/鲟鱼1.svg',
    svg: demo17,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '生育期'
      },
      text2: {
        type: 'input',
        val: '',
        title: '生物量'
      },
      text3: {
        type: 'input',
        val: '',
        title: '生长状态'
      }
    }
  },
  {
    id: 'jinli',
    title: '锦鲤',
    type: 'svg',
    thumbnail: '/svgs/锦鲤.svg',
    svg: demo20,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '生育期'
      },
      text2: {
        type: 'input',
        val: '',
        title: '生物量'
      },
      text3: {
        type: 'input',
        val: '',
        title: '生长状态'
      }
    }
  },
  {
    id: 'luofei',
    title: '罗非鱼',
    type: 'svg',
    thumbnail: '/svgs/罗非.svg',
    svg: demo21,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '生育期'
      },
      text2: {
        type: 'input',
        val: '',
        title: '生物量'
      },
      text3: {
        type: 'input',
        val: '',
        title: '生长状态'
      }
    }
  },
  {
    id: 'hongzun',
    title: '虹鳟鱼',
    type: 'svg',
    thumbnail: '/svgs/虹鳟1.svg',
    svg: demo22,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '生育期'
      },
      text2: {
        type: 'input',
        val: '',
        title: '生物量'
      },
      text3: {
        type: 'input',
        val: '',
        title: '生长状态'
      }
    }
  },
  {
    id: 'lashigui',
    title: '拉氏鱥',
    type: 'svg',
    thumbnail: '/svgs/拉什桂.svg',
    svg: demo23,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '生育期'
      },
      text2: {
        type: 'input',
        val: '',
        title: '生物量'
      },
      text3: {
        type: 'input',
        val: '',
        title: '生长状态'
      }
    }
  },
  {
    id: 'shengcai',
    title: '生菜',
    type: 'svg',
    thumbnail: '/svgs/生菜1.svg',
    svg: demo18,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '生育期'
      },
      text2: {
        type: 'input',
        val: '',
        title: '生物量'
      },
      text3: {
        type: 'input',
        val: '',
        title: '生长状态'
      }
    }
  },
  {
    id: 'qincai',
    title: '芹菜',
    type: 'svg',
    thumbnail: '/svgs/芹菜1.svg',
    svg: demo19,
    props: {
      text: {
        type: 'input',
        val: '',
        title: '生育期'
      },
      text2: {
        type: 'input',
        val: '',
        title: '生物量'
      },
      text3: {
        type: 'input',
        val: '',
        title: '生长状态'
      }
    }
  }
]);
</script>

<template>
  <router-view></router-view>
</template>

<style scoped></style>
